home *** CD-ROM | disk | FTP | other *** search
/ Univers Mac Interactif 42 / Univers Mac Interactif - Issue 42.iso / Outils / PCalc / Read Me First < prev   
Text File  |  1992-12-02  |  10KB  |  158 lines

  1. • PCalc Version 1.0 of January 1993
  2.  
  3. Designed and coded by James Thomson.
  4.  
  5. • Overview:
  6.  
  7. PCalc is a neat simulation of a programmable scientific calculator.
  8.  
  9. Please note that it *requires* System 7.x.x.
  10. If you use System 6.0.x or earlier, here is what you are missing:
  11.  
  12.     Programmable functions via a simple mini language.
  13.     System 7.x.x savvy:
  14.         Can be controlled & programmed via Apple Events.
  15.         Balloon Help for every button, menu & dialog item.
  16.         Resolves Aliases.
  17.         32-bit clean.
  18.         Multifinder aware.
  19.     Large 16+3 digit display.
  20.     Hierarchical menu of user functions.
  21.     Includes many functions for converting between different weights and measures.
  22.     Quick, one click, conversion between decimal, hexadecimal and binary numbers.
  23.     AND, OR, NOT, XOR, ROL, ROR and other extra functions in hex and binary mode.
  24.     30 named user constants, 10 for each mode.
  25.     'Undo' of any action.
  26.     'Minimize' button to shrink the calculator when not in use.
  27.     Enhanced graphics when viewed on a 256 colour or 16 grayscale (or better) screen.
  28.     Colour graphics and help screens are stored in separate plug-in extensions.
  29.     Runs on any Mac with System 7.x.x or greater, with or without Color Quickdraw.
  30.  
  31. And of course it's freeware - totally guilt-free software. If you really like it, send me a postcard. I'd rather release it as freeware than make it shareware and not hear anything back at all. If you are an influential person in a big company, think of this as a job application!
  32.  
  33. • Installing PCalc:
  34.  
  35. The 'PCalc Functions' file (*) should be in the same folder as the PCalc application. If you are running it on a colour screen, the 'PCalc Colour Extension' (*) should be there too. And if you need the balloon help and quick reference screens, the 'PCalc Help Extension' (*) should also be in the same folder. If you are running PCalc on a 1-bit screen, you don't need the colour extension present (it won't be used even if it is) and you can also reduce the memory PCalc uses to 128k rather than 256k from the 'Get Info' window. (* or an alias of it)
  36.  
  37. Make an alias of the main application and place it in the 'Apple Menu Items' folder inside the System Folder if you wish. Even better, put an alias in the 'Startup Items' folder and have the calculator always on hand. You may want to set the 'Minimize on Startup' option in the preferences dialog and 'Minimize on Context Switch' too in that case. 
  38.  
  39. • The Basics:
  40.  
  41. I'm assuming you've used a calculator before. If so, it should all be fairly intuative. Remember that everything has balloon help, so if you don't know what a particular button does, you can find out easily. The help screens accessed from the Help menu will give you some more clues. I really hate writing manuals, so I tried to make everything as obvious as possible so I wouldn't need to. I adhere to most of the Mac interface guidelines (the sensible ones anyway ;-) so you should cope. 
  42.  
  43. • Writing Your Own Functions:
  44.  
  45. The Functions menu is defined entirely in the 'PCalc Functions' file - which is just a plain text file. Open it up with your favourite text-editor and take a look. The file also describes the language used to write functions. As with the AppleEvent support, you don't have to know anything about this to use the calculator but it's there under the surface if you are interested. Quite a few functions are already defined for you and they might be all you need.
  46.  
  47. • Apple Events:
  48.  
  49. The events PCalc accepts were originally just hooks left in the program so I could add on a function editing program later - this is still a possibility. However, they also will be of use to those of you with something like QuicKeys with its AE extension, or Frontier, or even AppleScript if it ever shows up.  
  50.  
  51. CLASS:  ID:     Name:               
  52.  
  53. 'aevt'  'OAPP'  Open Application    
  54. Sets up PCalc on opening
  55.  
  56. 'aevt'  'ODOC'  Open Document       
  57. Does nothing, but included anyway
  58.  
  59. 'aevt'  'PDOC'  Print Document      
  60. Again, does nothing
  61.  
  62. 'aevt'  'QUIT'  Quit Application    
  63. Quits PCalc
  64.  
  65. 'p©al'  'p©GX'  GetXRegister
  66. Returns text of the displayed value
  67.  
  68. 'p©al'  'p©GY'  GetYRegister
  69. Returns text of the second memory
  70.  
  71. 'p©al'  'p©GM'  GetMemory
  72. Returns text of the memory
  73.  
  74. 'p©al'  'p©SX'  SetXRegister
  75. Sets display to text value in p©TX parameter
  76.  
  77. 'p©al'  'p©SY'  SetYRegister
  78. Sets second memory to text value in p©TX parameter
  79.  
  80. 'p©al'  'p©SM'  SetMemory
  81. Sets memory to text value in p©TX parameter
  82.  
  83. 'p©al'  'p©MD'  DecimalMode
  84. Change mode to decimal
  85.  
  86. 'p©al'  'p©MH'  HexadecimalMode
  87. Change mode to hexadecimal
  88.  
  89. 'p©al'  'p©MB'  BinaryMode
  90. Change mode to binary
  91.  
  92. 'p©al'  'p©UD'  UseDegrees
  93. Measure angles in degrees
  94.  
  95. 'p©al'  'p©UR'  UseRadians
  96. Measure angles in radians
  97.  
  98. 'p©al'  'p©CS'  ChangeSize
  99. Maximizes or minimizes the calculator
  100.  
  101. 'p©al'  'p©LF'  LoadFunctions
  102. Loads the 'PCalc Functions' file into PCalc
  103.  
  104. 'p©al'  'p©AN'  ApplyNamedFunction
  105. Applies the function with name stored in the p©TX parameter
  106.  
  107. 'p©al'  'p©AG'  ApplyGivenFunction
  108. Applies the function stored in p©TX parameter
  109.  
  110. • Virus Checking:
  111.  
  112. PCalc does some simple checks when it is run to see if the application has been modified. If so, it will alert you to the fact and refuse to run. Check it out with the latest version of Disinfectant (currently 2.9). But just because it alerts you, it doesn't mean you have a virus. Conversely, you might have a virus without it noticing. I don't know how it will react if compressed with the AutoDoubler 2.0 internal compressor or something similar. If you have such a product, the tamper check can be turned off using ResEdit. Mail me for details.
  113.  
  114. • Version Info:
  115.  
  116. 1.0 - First public release following several not widely travelled beta releases. No one has found any new bugs for a while so here it is!
  117.         
  118. • Bugs, Features & Forthcoming Events:
  119.  
  120. Firstly, the error handling is a bit shakey. If something bad happens during the  execution of a function, the calculator beeps but that's about it. If there is a syntax error in any of the functions... well, let's hope there aren't any syntax errors for now. The 'language' is probably the first thing for major overhaul in the next version. A more useful real language will probably be introduced with a stack and possibly even some flow control. Suggestions are welcome!
  121.  
  122. I'm not sure how well the calculator will behave on multiple-monitor setups. Earlier betas did horrible things when half on a colour monitor and half on a monochrome one. I may have fixed the problems but haven't had access to such a system for a while. If you have problems, keep the calculator on your main screen.
  123.  
  124. The Hex mode will get the ROL, ROR etc buttons since I found a need for them myself recently. Also, I have six buttons free in the hex and binary modes which are crying out for some useful functions but I can't think of any right now. Can anyone think of some useful hex and binary constants?
  125.  
  126. It's not really PowerBook friendly since it accesses the hard-drive a lot to save memory which I guess would cause you guys some problems. An option to hold all the code in memory at once at the expense of a higher memory requirement is possible.
  127.  
  128. The AppleEvent support will become a bit more standard. I know there are standard events for getting and putting data but since Apple haven't shipped my developer CDs yet, I don't know what they are. So non-standard events it is for now. There isn't an 'aete' resource yet either. But still, you can so some real cool things using QuicKeys with PCalc now like macros that convert the selected  number in your editor into hex and back, or total a list of numbers and type the result at the bottom. I hope to expand on this and make PCalc a sort of math-server. Hopefully this will form the basis of a project at Uni next year - PCalc GX anyone?
  129.  
  130. • About the Author:
  131.  
  132. The author is studying computing science at Glasgow University in the UK. He would like to hear from potential employers in the computing industry with a view to entering the 'real world'. Contact him at via internet email at thomsonj@dcs.glasgow.ac.uk or via 'real' mail at
  133.  
  134.     James Thomson,
  135.     25 Dumbreck Road,
  136.     Glasgow,
  137.     Scotland,
  138.     The UK,
  139.     G41 5LJ.
  140.  
  141. If you have any feedback on this calculator, do get in touch as well... Any cunning ideas have a pretty good chance of making it into the next version.
  142.  
  143. • Legal Blurb
  144.  
  145. If you use this calculator to design a bridge and the bridge falls down because of bugs in my code, tough - this is freeware and you are accepting all responsibility by using it. You will get my sympathy, but not my money.
  146.  
  147. I also retain all rights to PCalc. It may be freely distributed but it is copyright and not in the public domain. You may not distribute it for profit. Give copies to your friends, post it on your local BBS, but don't sell it. I also don't want to see it turning up in a 'for-profit' shareware library ie EDUCORP, although user-groups such as BMUG or the UK MUG are to be encouraged to distribute it.  I especially do not want to see it turning up on a CD-ROM collection (since most of the collections I have seen have been of dubious quality) or on the cover of a magazine unexpectedly (as I believe happened to the author of Apollo, Jeremy Rousak). The few exceptions to this are the Info-Mac CD-ROM since they seem to have the decency to ask authors for permission and give you a free CD for your troubles and the BMUG CD-ROM (if they send me a copy too). If you are in any doubts, ask my permission. 
  148.  
  149. Finally, please do not distribute modified versions of the program or other files at all.
  150.  
  151. • Last Thoughts:
  152.  
  153. Hey Apple/IBM, can I have a PowerPC so I can port this over?
  154. What colour are the PowerPC's going to be anyway? PowerBook colour?
  155. And what noise will they make on power-up? The public has a right to know.
  156.  
  157.  
  158.